﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("MsHouseMap")]
    public partial class MsHouseMap : BaseEntity
    {
        public MsHouseMap()
        {
            MsTasks = new HashSet<MsTask>();
        }

        public enum EnumHouseMapStatus
        { 启用 = 0, 禁用 = 1 }

        public enum EnumHouseMapType
        { 非标准层 = 0, 标准层 = 1 }

        /// <summary>
        /// 项目Id
        /// </summary>
        [Key]
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid HouseMapId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        [Required]
        public string Name { get; set; }

        [Required]
        [Column(TypeName = "uuid")]
        public Guid FieldId { get; set; }

        [Column(TypeName = "text")]
        public string Image_Base { get; set; }

        [Column(TypeName = "text")]
        public string Image_Task { get; set; }

        [Column(TypeName = "text")]
        public string Image_AgvSite { get; set; }

        [Required]
        [Column(TypeName = "uuid")]
        public Guid ProjectId { get; set; }

        [Required]
        [Column(TypeName = "int4")]
        public EnumHouseMapStatus Status { get; set; }

        /// <summary>
        /// 楼栋
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string BuildingBlock { get; set; }

        /// <summary>
        /// 楼层
        /// </summary>
        [Column(TypeName = "varchar(32)")]
        public string BuildingFloor { get; set; }

        [ForeignKey("ProjectId")]
        public virtual MsProject MsProject { get; set; }

        public virtual ICollection<MsTask> MsTasks { get; set; }

        /// <summary>
        /// 户型图标准标准测量点
        /// </summary>
        [Column(TypeName = "text")]
        public string MeasurePoints { get; set; }

        /// <summary>
        /// 标准层类型：0：非标准层，1：标准层
        /// </summary>
        [Column(TypeName = "int4")]
        public EnumHouseMapType MapType { get; set; }

        [Column(TypeName = "varchar(4000)")]
        public string HouseType { get; set; }

        [Column(TypeName = "numeric(10)")]
        public double MapArea { get; set; }

        /// <summary>
        /// 数据类型：0（实测户型图）、1（CAD数据）、2 （FMS模式数据），默认为0
        /// </summary>
        [Column(TypeName = "int4")]
        public int? DataType { get; set; }

        /// <summary>
        /// 标注的Excel路径
        /// </summary>
        [Column(TypeName = "varchar(1000)")]
        public string ExcelPath { get; set; }

        /// <summary>
        /// 是否已减去圆圈半径
        /// </summary>
        [Column(TypeName = "bool")]
        public bool? HasMinus { get; set; }

        /// <summary>
        /// 内墙模型路径1.3
        /// </summary>
        public string InnerWallPath { set; get; }

        /// <summary>
        /// 内墙墙线模型路径1.2
        /// </summary>
        public string InnerWallLinePath { set; get; }

        public int PointModified { get; set; } = 0;
    }
}